/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * LicenseFrame.java
 *
 * Created on 10/10/2009, 13:28:26
 */

package gui;


import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import javax.swing.JFrame;
import logicaDePredicados.PredicateLogic;

/**
 *
 * @author Francisco Gindre
 */
public class LicenseFrame extends javax.swing.JFrame {
    
    public LicenseFrame(BufferedReader fileReader) {
        super("License Agreement");
        this.setLocationRelativeTo(this.getParent());
        initComponents();
        
        
        try {


             StringBuffer sbf = new StringBuffer(1024);
             String line = fileReader.readLine();
            while(line!=null){
               sbf.append(line);
               sbf.append("\n");
               
               line=fileReader.readLine();


               
            }
             textArea1.append(sbf.toString());

           
        } catch (IOException ex) {
           JFrame errorFrame =  new ErrorFrame(ex.getMessage()) ;
           errorFrame.setVisible(rootPaneCheckingEnabled);
        }
        
        
    }
    /** Creates new form LicenseFrame */
    public LicenseFrame() {
        this.setLocationRelativeTo(this.getParent());
        initComponents();
        
        //textArea1.append(null);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        textArea1 = new java.awt.TextArea();
        jLabel4 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

        textArea1.setName("textArea1"); // NOI18N

        jLabel4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/resources/icons/background.png"))); // NOI18N
        jLabel4.setName("jLabel4"); // NOI18N

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(textArea1, javax.swing.GroupLayout.DEFAULT_SIZE, 633, Short.MAX_VALUE)
                .addContainerGap())
            .addGroup(layout.createSequentialGroup()
                .addGap(86, 86, 86)
                .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, 469, Short.MAX_VALUE)
                .addGap(98, 98, 98))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(textArea1, javax.swing.GroupLayout.PREFERRED_SIZE, 322, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new LicenseFrame().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel jLabel4;
    private java.awt.TextArea textArea1;
    // End of variables declaration//GEN-END:variables

}
